<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<%=basePath%>">
	<meta charset="utf-8" />
	<!--下拉框 -->
	<link rel="stylesheet" href="front/css/chosen.css" type="text/css" />
	<link rel="stylesheet" href="front/css/normal.css">
	<link rel="stylesheet" href="static/css/finance.css" />
	<link rel="stylesheet" href="front/content/css/projectAdm.css">

</head>
<body >
<form style='margin:0 auto;'>
		<p class="con-title">借款详情</p>
			<table class="tableListBorder">
				<colgroup>
					<col width="120px">
					<col width="150px">
					<col width="120px">
					<col width="250px">
					<col width="120px">
					<col>
				</colgroup>
				<tbody>
					<tr>
						<td style='text-align: center'>借款人姓名</td>
						<td><input class="fieldEditable" type="text" name="USERNAME" value="${pd.USERNAME}" readonly="readonly"></td>
						<td style='text-align: center'>所属部门</td>
						<td><input type="text" class="fieldEditable" name="department_name" value="${pd.department_name}" readonly="readonly"></td>
						<td style='text-align: center'>申请单号</td>
						<td><input id="application_no" class="fieldEditable" name="application_no" value="${pd.application_no}" class="fieldEditable" readonly="readonly"></td>
					</tr>
				</tbody>
			</table>
			<table class="tableListBorder2">
				<colgroup>
					<col width="120">
					<col>
					<col width="120">
					<col width="350">
				</colgroup>
				<tbody>
					<tr>
						<td><span class="redStar">*</span>借款事由</td>
						<td colspan="3"><textarea  name="bm_reason" readonly="readonly" 	class="loanTextarea">${pd.bm_reason}</textarea></td>
					</tr>
					<tr>
						<td><span class="redStar">*</span>借款金额</td>
						<td><input readonly="readonly"   value="${pd.bm_amount}" type="text" class="fieldEditable"></td>
						<td>金额大写</td>
						<td><input  value="${pd.capital}"	readonly="readonly" type="text" class="fieldEditable"></td>
					</tr>
					<tr>
						<td>借款方式</td>
						<td><select style="width: 350px;" name="bm_way" id="bm_way" class='select' disabled="disabled">
								<option value="0" <c:if test="${pd.bm_way==0}" >selected="selected" </c:if>>现金</option>
								<option value="1" <c:if test="${pd.bm_way==1}" >selected="selected" </c:if>>转账</option>
								<option value="2" <c:if test="${pd.bm_way==2}" >selected="selected" </c:if>>其它</option>
						</select></td>
						<!-- <td>未还款金额(元)</td>
						<td><input type="text" class="fieldEditable"></td> -->
						<td>申请日期</td>
						<td>
						<c:if test="${pd.bm_time==null}">
							<input id="bm_time" name="bm_time" value="${pd.bm_time}" class='fieldEditable form_datetime date'>
						</c:if>
						<c:if test="${pd.bm_time!=null}">
							<fmt:formatDate value="${pd.bm_time}" pattern="yyyy-MM-dd HH:mm:ss"/>
						</c:if>
						</td>
					</tr>
					<tr>
						<td><span class="redStar">*</span>预计还款日期</td>
						<td><fmt:formatDate value="${pd.repayment_time}" pattern="yyyy-MM-dd"/></td>
						<td><span class="redStar">*</span>最迟到账时间</td>
						<td><fmt:formatDate value="${pd.accounting_date}" pattern="yyyy-MM-dd"/></td> 
					</tr>
					<tr class="accountclass">
						<td><span class="redStar">*</span>账户名称</td>
						<td><input type="text" class="fieldEditable" readonly="readonly" value="${pd.bm_account}">
						</td>
					    <td><span class="redStar">*</span>银行账号</td>
						<td><input class="fieldEditable" readonly="readonly" value="${pd.bm_card_numbers}">
						</td> 

					</tr>
					<tr class="accountclass">
						<td><span class="redStar">*</span>开户银行</td>
						<td colspan="3"><input class="fieldEditable" readonly="readonly" value="${pd.opening_bank}">
						</td>
					</tr>
			 </tbody>
			</table>
			<c:if test="${pd.bm_attach_path  !=null && pd.bm_attach_name !=''}">
				<p>
					点击下载：<a class="btn btn-mini btn-primary" href="192.168.198.251:8080/${pd.bm_attach_path}">${pd.bm_attach_name}</a>
				</p>
			</c:if>
			<c:if test="${pd.bm_attach_path  ==null || pd.bm_attach_path ==''}">
				<!-- <span>上传附件:</span>
			 	<a class="file operatea upload">
				            点击上传文件
		            <input type="file" name="bm_attach_path">
		            <span></span>
		        </a> -->
			</c:if>
	</form>	
	<p class="btn-box">
        <button onclick="javascript:history.back(-1);">返回</button>
    </p>
    <script src="front/js/jquery-2.0.3.min.js"></script>
	<!-- 下拉框 -->
	<script src="front/js/chosen.jquery.js"></script>
	<!-- 日历插件 -->
	<script src="front/js/bootstrap-datetimepicker.js"></script>
	<script src="front/js/jquery.tips.js"></script>
	<script src="front/js/index.js"></script>
	<!-- 日期框 -->
	<script>
		     $(function() {
		    	 //下拉框
			     $(".select").chosen();
			 //下拉框
		     var way=$("#bm_way").val();
				if(way=='0'){
					$(".accountclass").hide();
				}else{
					$(".accountclass").show();
				}
			})
         </script>
</body>
</html>